using AutoMapper;
using SmartProduction.Domain.客户管理;
using SmartProduction.Domain.yjh;
using SmartProduction.Domain.采购委外订单;
using SmartProduction.Write.API.Application.Commands.ClientInfoCommand;
using SmartProduction.Write.API.Application.Commands.DepartCommand;
using SmartProduction.Write.API.Application.Commands.ResourceInfoCommand;
using SmartProduction.Write.API.Application.Commands.MaterialLists;
using SmartProduction.Write.API.Application.Commands.ProductPlan;
using SmartProduction.Write.API.Application.Commands.WorkFlow;
using SmartProduction.Write.API.Application.Commands.SupplierCommand;
using SmartProduction.Write.API.Application.Commands.WareHouser;
using SmartProduction.Write.API.Application.Commands.WorNum;
using SmartProduction.Write.API.Application.Commands.ProcessRouteCommand;
using SmartProduction.Write.API.Application.Commands.EnterpriseCommand;
using SmartProduction.Write.API.Application.Commands.JobCommand_工作中心;
using SmartProduction.Domain;
using SmartProduction.Write.API.Application.Commands.SalesOrderCommand;
using SmartProduction.Write.API.Application.Commands.PurchaseCommand;
using SmartProduction.Write.API.Application.Commands.MaterialInfoCommand;
using SmartProduction.Write.API.Application.Commands.BomCommand;
using SmartProduction.Domain.ProductionOrders;
using SmartProduction.Write.API.Application.Commands.BasicCeate;

namespace SmartProduction.Write.API
{
    /// <summary>
    /// dto映射
    /// </summary>
    public class AutoMapperFile : Profile
    {
        public AutoMapperFile()
        {
            CreateMap<DepartCreateCommand,Depart>().ReverseMap();
            //客户信息新增
            CreateMap<ClientInfoCreateCommand,ClientInfo>().ReverseMap();
            //资源信息新增
            CreateMap<ResourceInfoCreateCommand,ResourceInfo>().ReverseMap();
            //销售订单新增
            CreateMap<SalesOrderCrearteCommand,SalesOrder>().ReverseMap();
            //销售订单修改
            CreateMap<SalesOrderUpdCommand,SalesOrder>().ReverseMap();
            //物料服务新增
            CreateMap<MaterialInfoCreateCommand,MaterialInfo>().ReverseMap();

            CreateMap<MaterialListCommand, MaterialList>().ReverseMap();
            CreateMap<MaterListUpdateCommand, MaterialList>().ReverseMap();
            CreateMap<MaterListDeleteCommand, MaterialList>().ReverseMap();
            CreateMap<MaterListTypeCreateCommand, MaterialListType>().ReverseMap();
            CreateMap<WorkFlowCreateCommand, Workflows>().ReverseMap();
            CreateMap<WorkFlowDeleteCommand, Workflows>().ReverseMap();
            CreateMap<WorkFlowUpdateCommand, Workflows>().ReverseMap();
            CreateMap<ProductPlanCreateCommand, ProductPlan>().ReverseMap();
            CreateMap<ProductPlanDeleteCommand, ProductPlan>().ReverseMap();
            CreateMap<ProductPlanUpdateCommand, ProductPlan>().ReverseMap();
            CreateMap<WareHouserCreateCommand,WareHouse>().ReverseMap();
            CreateMap<WareHoresUpdateCommand, WareHouse>().ReverseMap();
            CreateMap<WareHoresDeleteCommand, WareHouse>().ReverseMap();
            CreateMap<WorkNumCreateCommand,Domain.yjh.Process>().ReverseMap();
            CreateMap<WorkNumDeleteCommand, Domain.yjh.Process>().ReverseMap();
            CreateMap<WorkNumUpdateCommand, Domain.yjh.Process>().ReverseMap();

            //部门
            CreateMap<DepartCreateCommand, Depart>().ReverseMap();

            //供应商相关
            CreateMap<SupplierCreateCommand, Supplier>().ReverseMap();
            CreateMap<SupplierDeleteCommand, Supplier>().ReverseMap();
            CreateMap<SupplierUpdateCommand, Supplier>().ReverseMap();



            //工艺路线
            CreateMap<ProcessRouteCreateCommand, ProcessRoute>().ReverseMap();
            //企业管理
            CreateMap<EnterpriseCreateCommand, Enterprise>().ReverseMap();

            //工作中心
            CreateMap<JobAddCommand, Job>().ReverseMap();
            CreateMap<JobUpdateCommand, Job>().ReverseMap();

            //采购/委外订单
            CreateMap<PurchaseCreateCommand, Purchase>().ReverseMap();
            CreateMap<PurchaseUpdateCommand, Purchase>().ReverseMap();
            //采购委外详情信息
            CreateMap<PurchasedetailsCreateCommand, Purchasedetails>().ReverseMap();
            CreateMap<PurchaseCreatedetailsCreateCommand, Purchase>().ReverseMap();
            CreateMap<PurchaseCreatedetailsCreateCommand, Purchasedetails>().ReverseMap();

    
            CreateMap<BomCreateCommand, Bom>().ReverseMap();
            CreateMap<BomParts, BomPartsCreateCommand>().ReverseMap();
            CreateMap<ProcessInfo, ProcessInfoCreateCommand>().ReverseMap();
            CreateMap<Bom, EditBomCommand>().ReverseMap();

            //质检

            CreateMap<Basicinformation, ZhijianBasicinformationcreatecommand>().ReverseMap();
        }
    }
}
